﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Reflection;
using System.Windows.Forms;
using System.Xml;
using Assist;
using YJKArch.DictModule;

namespace YJKArch.DimensionModule
{
	public partial class DlgDictForm : System.Windows.Forms.Form
	{
		public DlgDictForm()
		{
			this.InitializeComponent();
		}

		private void DictForm_Load(object sender, EventArgs e)
		{
			this.tempFile = Assist.FileUtil.GetTempDataFile();
			this.path = Assembly.GetExecutingAssembly().Location;
			int length = this.path.LastIndexOf("\\");
			this.path = this.path.Substring(0, length);
			int length2 = this.path.LastIndexOf("\\");
			this.path = this.path.Substring(0, length2);
			this.path += "\\Data\\dict.xml";
			this.dictFile = new FileInfo(this.path);
			string fileName = this.path;
			if (!this.dictFile.Exists)
			{
				MessageBox.Show("默认词库文件不存在。\n请检查软件是否安装正确，或手动选择词库文件。", "盈建科词库");
				OpenFileDialog openFileDialog = new OpenFileDialog();
				openFileDialog.FileName = "Dict.xml";
				openFileDialog.Filter = "词库(*.xml)|*.xml";
				if (openFileDialog.ShowDialog() != DialogResult.OK)
				{
					return;
				}
				Dictionary<string, string> dictionary = new Dictionary<string, string>();
				dictionary.Add("词库文件名", openFileDialog.FileName);
				Assist.FileUtil.WriteTempData(this.tempFile.FullName, "专业词库", ConfigData.DictData, dictionary);
				this.dictFile = new FileInfo(openFileDialog.FileName);
				fileName = openFileDialog.FileName;
			}
			this.FillTree(this.treeView1, fileName);
		}

		public void FillTree(TreeView tree, string fileName)
		{
			tree.Nodes.Clear();
			XmlDocument xmlDocument = new XmlDocument();
			xmlDocument.Load(fileName);
			XmlNode xmlNode = xmlDocument.SelectSingleNode("盈建科词库");
			TreeNode treeNode = new TreeNode(xmlNode.Attributes["name"].Value);
			treeNode.Text = xmlNode.Attributes["name"].Value;
			treeNode.Tag = xmlNode;
			this.SetChildNode(treeNode, xmlNode);
			tree.Nodes.Add(treeNode);
			tree.ExpandAll();
			tree.SelectedNode = tree.Nodes[0];
		}

		private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
		{
			this.lbxEntry.Items.Clear();
			if (e.Node.Text != "最近使用的词")
			{
				this.lbxEntry.Sorted = true;
			}
			else
			{
				this.lbxEntry.Sorted = false;
			}
			this.GetChildAttributes((XmlNode)e.Node.Tag, this.lbxEntry);
			this.initEntry();
		}

		public void GetChildAttributes(XmlNode node, ListBox lbx)
		{
			foreach (object obj in node.ChildNodes)
			{
				XmlNode xmlNode = (XmlNode)obj;
				if (xmlNode.Name == "词条")
				{
					lbx.Items.Insert(0, new StringEntry(xmlNode.Attributes["name"].Value, (xmlNode.InnerText == "") ? xmlNode.Attributes["name"].Value : xmlNode.InnerText, xmlNode));
					this.GetChildAttributes(xmlNode, lbx);
				}
				else if (xmlNode.Name == "目录" && xmlNode.Attributes["name"].Value != "最近使用的词")
				{
					this.GetChildAttributes(xmlNode, lbx);
				}
			}
		}

		private void SetChildNode(TreeNode tn, XmlNode xn)
		{
			foreach (object obj in xn.ChildNodes)
			{
				XmlNode xmlNode = (XmlNode)obj;
				if (xmlNode.Name == "目录")
				{
					TreeNode treeNode = new TreeNode(xmlNode.Attributes["name"].Value);
					treeNode.Text = xmlNode.Attributes["name"].Value;
					treeNode.Tag = xmlNode;
					this.SetChildNode(treeNode, xmlNode);
					tn.Nodes.Add(treeNode);
				}
			}
		}

		private void initEntry()
		{
			try
			{
				string b = "";
				bool flag = false;
				foreach (object obj in this.lbxEntry.Items)
				{
					if (obj.ToString() == b)
					{
						this.lbxEntry.SelectedItem = obj;
						flag = true;
						this.lbxEntry.SelectedItem = obj;
						break;
					}
				}
				if (!flag && this.lbxEntry.Items.Count > 0)
				{
					this.lbxEntry.SelectedIndex = 0;
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message, "盈建科提示");
			}
		}

		private void Search(ListBox lbx, string str)
		{
			int length = str.Trim().Length;
			for (int i = 0; i < lbx.Items.Count; i++)
			{
				StringEntry stringEntry = (StringEntry)lbx.Items[i];
				bool flag = false;
				if (stringEntry.GetThumbnail().Length >= length)
				{
					for (int j = 0; j < length; j++)
					{
						if (!stringEntry.GetThumbnail().Substring(j, 1).Equals(str.Substring(j, 1)) && !stringEntry.Name.Substring(j, 1).Equals(str.Substring(j, 1)))
						{
							flag = false;
							break;
						}
						flag = true;
					}
				}
				if (flag)
				{
					lbx.SelectedIndex = i;
					return;
				}
			}
		}

		private void label1_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "A");
		}

		private void button3_Click(object sender, EventArgs e)
		{
			this.text = this.textBox1.Text;
			base.Close();
		}

		private void lbxEntry_SelectedIndexChanged_1(object sender, EventArgs e)
		{
			if (this.lbxEntry.SelectedItem != null)
			{
				StringEntry stringEntry = (StringEntry)this.lbxEntry.SelectedItem;
				this.textBox1.Text = stringEntry.Text;
			}
		}

		private void button4_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "A");
		}

		private void button5_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "B");
		}

		private void button6_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "C");
		}

		private void button7_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "D");
		}

		private void button8_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "E");
		}

		private void button9_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "F");
		}

		private void button10_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "G");
		}

		private void button11_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "H");
		}

		private void button12_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "I");
		}

		private void button13_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "J");
		}

		private void button14_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "K");
		}

		private void button15_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "L");
		}

		private void button17_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "M");
		}

		private void button19_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "N");
		}

		private void button21_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "O");
		}

		private void button16_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "P");
		}

		private void button18_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "Q");
		}

		private void button20_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "R");
		}

		private void button22_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "S");
		}

		private void button23_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "T");
		}

		private void button27_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "U");
		}

		private void button24_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "V");
		}

		private void button25_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "W");
		}

		private void button26_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "X");
		}

		private void button28_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "Y");
		}

		private void button29_Click(object sender, EventArgs e)
		{
			this.Search(this.lbxEntry, "Z");
		}

		private void button2_Click(object sender, EventArgs e)
		{
			if (DictOperation.AddStringEntry((XmlNode)this.treeView1.SelectedNode.Tag, new StringEntry(this.textBox1.Text, this.textBox1.Text, null), this.dictFile.FullName))
			{
				TreeNode selectedNode = this.treeView1.SelectedNode;
				this.lbxEntry.Items.Clear();
				XmlNode node = (XmlNode)selectedNode.Tag;
				this.GetChildAttributes(node, this.lbxEntry);
				this.lbxEntry.Sorted = true;
				MessageBox.Show("添加成功", "盈建科词库");
				return;
			}
			MessageBox.Show("添加失败", "盈建科词库");
		}

		private void button1_Click(object sender, EventArgs e)
		{
			if (this.lbxEntry.SelectedItem != null)
			{
				if (DictOperation.EditStringEntry(((StringEntry)this.lbxEntry.SelectedItem).XNode, this.lbxEntry.SelectedItem.ToString(), this.textBox1.Text, this.dictFile.FullName, false))
				{
					TreeNode selectedNode = this.treeView1.SelectedNode;
					this.lbxEntry.Items.Clear();
					XmlNode node = (XmlNode)selectedNode.Tag;
					this.GetChildAttributes(node, this.lbxEntry);
					this.lbxEntry.Sorted = true;
					MessageBox.Show("修改成功", "盈建科词库");
					return;
				}
				MessageBox.Show("修改失败", "盈建科词库");
			}
		}

		private void 删除行ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (this.treeView1.SelectedNode != null)
			{
				if (DictOperation.RemoveDirectory(((XmlNode)this.treeView1.SelectedNode.Tag).ParentNode, (XmlNode)this.treeView1.SelectedNode.Tag, this.dictFile.FullName))
				{
					new DictOperation(this.dictFile.FullName).FillTree(this.treeView1);
					this.lbxEntry.Items.Clear();
					XmlNode node = (XmlNode)this.treeView1.Nodes[0].Tag;
					this.GetChildAttributes(node, this.lbxEntry);
					this.lbxEntry.Sorted = true;
					this.textBox1.Text = "";
					MessageBox.Show("删除成功", "盈建科词库");
					return;
				}
				MessageBox.Show("删除失败", "盈建科词库");
			}
		}

		private void 重命名ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			DlgEditDirectory.GetInstance(this).ShowDialog();
		}

		private void 新建行ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			DlgAddSubDirectory.GetInstance(this).ShowDialog(this);
		}

		private void 添加词条ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			DlgAddEntry.GetInstance(this).ShowDialog();
		}

		private void 修改词条ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (this.lbxEntry.SelectedItem != null)
			{
				DlgEditEntry.GetInstance(this).ShowDialog(this);
			}
		}

		private void 删除词条ToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (this.lbxEntry.SelectedItem != null)
			{
				object selectedItem = this.lbxEntry.SelectedItem;
				if (DictOperation.RemoveStringEntry(((StringEntry)this.lbxEntry.SelectedItem).XNode.ParentNode, ((StringEntry)this.lbxEntry.SelectedItem).XNode, this.dictFile.FullName))
				{
					this.lbxEntry.Items.Remove(selectedItem);
					MessageBox.Show("删除成功", "盈建科词库");
					return;
				}
				MessageBox.Show("删除失败", "盈建科词库");
			}
		}

		private void DlgDictForm_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\u001b')
			{
				base.Close();
			}
		}

		public void InitializeComponent()
		{
			this.components = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(DlgDictForm));
			this.treeView1 = new TreeView();
			this.contextMenuStrip1 = new ContextMenuStrip(this.components);
			this.新建行ToolStripMenuItem = new ToolStripMenuItem();
			this.删除行ToolStripMenuItem = new ToolStripMenuItem();
			this.重命名ToolStripMenuItem = new ToolStripMenuItem();
			this.lbxEntry = new ListBox();
			this.contextMenuStrip2 = new ContextMenuStrip(this.components);
			this.添加词条ToolStripMenuItem = new ToolStripMenuItem();
			this.修改词条ToolStripMenuItem = new ToolStripMenuItem();
			this.删除词条ToolStripMenuItem = new ToolStripMenuItem();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.button1 = new Button();
			this.button2 = new Button();
			this.button3 = new Button();
			this.button4 = new Button();
			this.button5 = new Button();
			this.button6 = new Button();
			this.button7 = new Button();
			this.button8 = new Button();
			this.button9 = new Button();
			this.button10 = new Button();
			this.button11 = new Button();
			this.button13 = new Button();
			this.button14 = new Button();
			this.button15 = new Button();
			this.button16 = new Button();
			this.button17 = new Button();
			this.button18 = new Button();
			this.button19 = new Button();
			this.button20 = new Button();
			this.button21 = new Button();
			this.button22 = new Button();
			this.button23 = new Button();
			this.button25 = new Button();
			this.button26 = new Button();
			this.button28 = new Button();
			this.button29 = new Button();
			this.contextMenuStrip1.SuspendLayout();
			this.contextMenuStrip2.SuspendLayout();
			base.SuspendLayout();
			this.treeView1.ContextMenuStrip = this.contextMenuStrip1;
			this.treeView1.Location = new System.Drawing.Point(10, 60);
			this.treeView1.Name = "treeView1";
			this.treeView1.Size = new Size(159, 243);
			this.treeView1.TabIndex = 0;
			this.treeView1.AfterSelect += this.treeView1_AfterSelect;
			this.contextMenuStrip1.Items.AddRange(new ToolStripItem[]
			{
				this.新建行ToolStripMenuItem,
				this.删除行ToolStripMenuItem,
				this.重命名ToolStripMenuItem
			});
			this.contextMenuStrip1.Name = "contextMenuStrip1";
			this.contextMenuStrip1.Size = new Size(131, 70);
			this.新建行ToolStripMenuItem.Name = "新建行ToolStripMenuItem";
			this.新建行ToolStripMenuItem.Size = new Size(130, 22);
			this.新建行ToolStripMenuItem.Text = "添加子目录";
			this.新建行ToolStripMenuItem.Click += this.新建行ToolStripMenuItem_Click;
			this.删除行ToolStripMenuItem.Name = "删除行ToolStripMenuItem";
			this.删除行ToolStripMenuItem.Size = new Size(130, 22);
			this.删除行ToolStripMenuItem.Text = "删除目录";
			this.删除行ToolStripMenuItem.Click += this.删除行ToolStripMenuItem_Click;
			this.重命名ToolStripMenuItem.Name = "重命名ToolStripMenuItem";
			this.重命名ToolStripMenuItem.Size = new Size(130, 22);
			this.重命名ToolStripMenuItem.Text = "重命名";
			this.重命名ToolStripMenuItem.Click += this.重命名ToolStripMenuItem_Click;
			this.lbxEntry.ContextMenuStrip = this.contextMenuStrip2;
			this.lbxEntry.FormattingEnabled = true;
			this.lbxEntry.ItemHeight = 12;
			this.lbxEntry.Location = new System.Drawing.Point(177, 60);
			this.lbxEntry.Name = "lbxEntry";
			this.lbxEntry.Size = new Size(239, 244);
			this.lbxEntry.TabIndex = 1;
			this.lbxEntry.SelectedIndexChanged += this.lbxEntry_SelectedIndexChanged_1;
			this.contextMenuStrip2.Items.AddRange(new ToolStripItem[]
			{
				this.添加词条ToolStripMenuItem,
				this.修改词条ToolStripMenuItem,
				this.删除词条ToolStripMenuItem
			});
			this.contextMenuStrip2.Name = "contextMenuStrip2";
			this.contextMenuStrip2.Size = new Size(119, 70);
			this.添加词条ToolStripMenuItem.Name = "添加词条ToolStripMenuItem";
			this.添加词条ToolStripMenuItem.Size = new Size(118, 22);
			this.添加词条ToolStripMenuItem.Text = "添加词条";
			this.添加词条ToolStripMenuItem.Click += this.添加词条ToolStripMenuItem_Click;
			this.修改词条ToolStripMenuItem.Name = "修改词条ToolStripMenuItem";
			this.修改词条ToolStripMenuItem.Size = new Size(118, 22);
			this.修改词条ToolStripMenuItem.Text = "修改词条";
			this.修改词条ToolStripMenuItem.Click += this.修改词条ToolStripMenuItem_Click;
			this.删除词条ToolStripMenuItem.Name = "删除词条ToolStripMenuItem";
			this.删除词条ToolStripMenuItem.Size = new Size(118, 22);
			this.删除词条ToolStripMenuItem.Text = "删除词条";
			this.删除词条ToolStripMenuItem.Click += this.删除词条ToolStripMenuItem_Click;
			this.textBox1.Location = new System.Drawing.Point(10, 312);
			this.textBox1.Multiline = true;
			this.textBox1.Name = "textBox1";
			this.textBox1.ScrollBars = ScrollBars.Vertical;
			this.textBox1.Size = new Size(343, 67);
			this.textBox1.TabIndex = 2;
			this.button1.Location = new System.Drawing.Point(359, 308);
			this.button1.Name = "button1";
			this.button1.Size = new Size(58, 23);
			this.button1.TabIndex = 3;
			this.button1.Text = "修改";
			this.button1.UseVisualStyleBackColor = true;
			this.button1.Click += this.button1_Click;
			this.button2.Location = new System.Drawing.Point(359, 334);
			this.button2.Name = "button2";
			this.button2.Size = new Size(58, 23);
			this.button2.TabIndex = 4;
			this.button2.Text = "入库";
			this.button2.UseVisualStyleBackColor = true;
			this.button2.Click += this.button2_Click;
			this.button3.DialogResult = DialogResult.OK;
			this.button3.Location = new System.Drawing.Point(360, 359);
			this.button3.Name = "button3";
			this.button3.Size = new Size(57, 23);
			this.button3.TabIndex = 5;
			this.button3.Text = "确定";
			this.button3.UseVisualStyleBackColor = true;
			this.button3.Click += this.button3_Click;
			this.button4.Location = new System.Drawing.Point(17, 1);
			this.button4.Name = "button4";
			this.button4.Size = new Size(23, 23);
			this.button4.TabIndex = 7;
			this.button4.Text = "A";
			this.button4.UseVisualStyleBackColor = true;
			this.button4.Click += this.button4_Click;
			this.button5.Location = new System.Drawing.Point(40, 1);
			this.button5.Name = "button5";
			this.button5.Size = new Size(23, 23);
			this.button5.TabIndex = 8;
			this.button5.Text = "B";
			this.button5.UseVisualStyleBackColor = true;
			this.button5.Click += this.button5_Click;
			this.button6.Location = new System.Drawing.Point(63, 1);
			this.button6.Name = "button6";
			this.button6.Size = new Size(23, 23);
			this.button6.TabIndex = 9;
			this.button6.Text = "C";
			this.button6.UseVisualStyleBackColor = true;
			this.button6.Click += this.button6_Click;
			this.button7.Location = new System.Drawing.Point(86, 1);
			this.button7.Name = "button7";
			this.button7.Size = new Size(23, 23);
			this.button7.TabIndex = 9;
			this.button7.Text = "D";
			this.button7.UseVisualStyleBackColor = true;
			this.button7.Click += this.button7_Click;
			this.button8.Location = new System.Drawing.Point(109, 1);
			this.button8.Name = "button8";
			this.button8.Size = new Size(23, 23);
			this.button8.TabIndex = 9;
			this.button8.Text = "E";
			this.button8.UseVisualStyleBackColor = true;
			this.button8.Click += this.button8_Click;
			this.button9.Location = new System.Drawing.Point(133, 1);
			this.button9.Name = "button9";
			this.button9.Size = new Size(23, 23);
			this.button9.TabIndex = 9;
			this.button9.Text = "F";
			this.button9.UseVisualStyleBackColor = true;
			this.button9.Click += this.button9_Click;
			this.button10.Location = new System.Drawing.Point(156, 1);
			this.button10.Name = "button10";
			this.button10.Size = new Size(23, 23);
			this.button10.TabIndex = 9;
			this.button10.Text = "G";
			this.button10.UseVisualStyleBackColor = true;
			this.button10.Click += this.button10_Click;
			this.button11.Location = new System.Drawing.Point(181, 1);
			this.button11.Name = "button11";
			this.button11.Size = new Size(23, 23);
			this.button11.TabIndex = 9;
			this.button11.Text = "H";
			this.button11.UseVisualStyleBackColor = true;
			this.button11.Click += this.button11_Click;
			this.button13.Location = new System.Drawing.Point(206, 1);
			this.button13.Name = "button13";
			this.button13.Size = new Size(23, 23);
			this.button13.TabIndex = 9;
			this.button13.Text = "J";
			this.button13.UseVisualStyleBackColor = true;
			this.button13.Click += this.button13_Click;
			this.button14.Location = new System.Drawing.Point(229, 1);
			this.button14.Name = "button14";
			this.button14.Size = new Size(23, 23);
			this.button14.TabIndex = 9;
			this.button14.Text = "K";
			this.button14.UseVisualStyleBackColor = true;
			this.button14.Click += this.button14_Click;
			this.button15.Location = new System.Drawing.Point(253, 1);
			this.button15.Name = "button15";
			this.button15.Size = new Size(23, 23);
			this.button15.TabIndex = 9;
			this.button15.Text = "L";
			this.button15.UseVisualStyleBackColor = true;
			this.button15.Click += this.button15_Click;
			this.button16.Location = new System.Drawing.Point(347, 1);
			this.button16.Name = "button16";
			this.button16.Size = new Size(23, 23);
			this.button16.TabIndex = 9;
			this.button16.Text = "P";
			this.button16.UseVisualStyleBackColor = true;
			this.button16.Click += this.button16_Click;
			this.button17.Location = new System.Drawing.Point(277, 1);
			this.button17.Name = "button17";
			this.button17.Size = new Size(23, 23);
			this.button17.TabIndex = 9;
			this.button17.Text = "M";
			this.button17.UseVisualStyleBackColor = true;
			this.button17.Click += this.button17_Click;
			this.button18.Location = new System.Drawing.Point(370, 1);
			this.button18.Name = "button18";
			this.button18.Size = new Size(23, 23);
			this.button18.TabIndex = 9;
			this.button18.Text = "Q";
			this.button18.UseVisualStyleBackColor = true;
			this.button18.Click += this.button18_Click;
			this.button19.Location = new System.Drawing.Point(301, 1);
			this.button19.Name = "button19";
			this.button19.Size = new Size(23, 23);
			this.button19.TabIndex = 9;
			this.button19.Text = "N";
			this.button19.UseVisualStyleBackColor = true;
			this.button19.Click += this.button19_Click;
			this.button20.Location = new System.Drawing.Point(394, 1);
			this.button20.Name = "button20";
			this.button20.Size = new Size(23, 23);
			this.button20.TabIndex = 9;
			this.button20.Text = "R";
			this.button20.UseVisualStyleBackColor = true;
			this.button20.Click += this.button20_Click;
			this.button21.Location = new System.Drawing.Point(324, 1);
			this.button21.Name = "button21";
			this.button21.Size = new Size(23, 23);
			this.button21.TabIndex = 9;
			this.button21.Text = "O";
			this.button21.UseVisualStyleBackColor = true;
			this.button21.Click += this.button21_Click;
			this.button22.Location = new System.Drawing.Point(18, 30);
			this.button22.Name = "button22";
			this.button22.Size = new Size(23, 23);
			this.button22.TabIndex = 9;
			this.button22.Text = "S";
			this.button22.UseVisualStyleBackColor = true;
			this.button22.Click += this.button22_Click;
			this.button23.Location = new System.Drawing.Point(41, 30);
			this.button23.Name = "button23";
			this.button23.Size = new Size(23, 23);
			this.button23.TabIndex = 9;
			this.button23.Text = "T";
			this.button23.UseVisualStyleBackColor = true;
			this.button23.Click += this.button23_Click;
			this.button25.Location = new System.Drawing.Point(64, 30);
			this.button25.Name = "button25";
			this.button25.Size = new Size(23, 23);
			this.button25.TabIndex = 9;
			this.button25.Text = "W";
			this.button25.UseVisualStyleBackColor = true;
			this.button25.Click += this.button25_Click;
			this.button26.Location = new System.Drawing.Point(87, 30);
			this.button26.Name = "button26";
			this.button26.Size = new Size(23, 23);
			this.button26.TabIndex = 9;
			this.button26.Text = "X";
			this.button26.UseVisualStyleBackColor = true;
			this.button26.Click += this.button26_Click;
			this.button28.Location = new System.Drawing.Point(111, 30);
			this.button28.Name = "button28";
			this.button28.Size = new Size(23, 23);
			this.button28.TabIndex = 9;
			this.button28.Text = "Y";
			this.button28.UseVisualStyleBackColor = true;
			this.button28.Click += this.button28_Click;
			this.button29.Location = new System.Drawing.Point(134, 30);
			this.button29.Name = "button29";
			this.button29.Size = new Size(23, 23);
			this.button29.TabIndex = 9;
			this.button29.Text = "Z";
			this.button29.UseVisualStyleBackColor = true;
			this.button29.Click += this.button29_Click;
			base.AutoScaleDimensions = new SizeF(6f, 12f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(428, 391);
			base.Controls.Add(this.button29);
			base.Controls.Add(this.button28);
			base.Controls.Add(this.button23);
			base.Controls.Add(this.button22);
			base.Controls.Add(this.button15);
			base.Controls.Add(this.button21);
			base.Controls.Add(this.button26);
			base.Controls.Add(this.button14);
			base.Controls.Add(this.button20);
			base.Controls.Add(this.button10);
			base.Controls.Add(this.button19);
			base.Controls.Add(this.button25);
			base.Controls.Add(this.button13);
			base.Controls.Add(this.button18);
			base.Controls.Add(this.button9);
			base.Controls.Add(this.button17);
			base.Controls.Add(this.button16);
			base.Controls.Add(this.button8);
			base.Controls.Add(this.button11);
			base.Controls.Add(this.button7);
			base.Controls.Add(this.button6);
			base.Controls.Add(this.button5);
			base.Controls.Add(this.button4);
			base.Controls.Add(this.button3);
			base.Controls.Add(this.button2);
			base.Controls.Add(this.button1);
			base.Controls.Add(this.textBox1);
			base.Controls.Add(this.lbxEntry);
			base.Controls.Add(this.treeView1);
			base.FormBorderStyle = FormBorderStyle.FixedDialog;
			base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "DlgDictForm";
			base.ShowIcon = false;
			base.ShowInTaskbar = false;
			this.Text = "专业文字";
			base.Load += this.DictForm_Load;
			base.KeyPress += this.DlgDictForm_KeyPress;
			this.contextMenuStrip1.ResumeLayout(false);
			this.contextMenuStrip2.ResumeLayout(false);
			base.ResumeLayout(false);
			base.PerformLayout();
		}

		public string text;

		public FileInfo dictFile;

		private FileInfo tempFile;

		private string path;

		public TreeView treeView1;

		public ListBox lbxEntry;

		public System.Windows.Forms.TextBox textBox1;

		private Button button1;

		private Button button2;

		private Button button3;

		private Button button4;

		private Button button5;

		private Button button6;

		private Button button7;

		private Button button8;

		private Button button9;

		private Button button10;

		private Button button11;

		private Button button13;

		private Button button14;

		private Button button15;

		private Button button16;

		private Button button17;

		private Button button18;

		private Button button19;

		private Button button20;

		private Button button21;

		private Button button22;

		private Button button23;

		private Button button25;

		private Button button26;

		private Button button28;

		private Button button29;

		private ContextMenuStrip contextMenuStrip1;

		private ToolStripMenuItem 新建行ToolStripMenuItem;

		private ToolStripMenuItem 删除行ToolStripMenuItem;

		private ToolStripMenuItem 重命名ToolStripMenuItem;

		private ContextMenuStrip contextMenuStrip2;

		private ToolStripMenuItem 添加词条ToolStripMenuItem;

		private ToolStripMenuItem 修改词条ToolStripMenuItem;

		private ToolStripMenuItem 删除词条ToolStripMenuItem;
	}
}
